/*
 * Copyright (C) 2010-2011 Comcast Cable.  All Rights Reserved.
 */
package com.hercules.android.receiver.app;

import android.app.Application;

import com.hercules.android.receiver.AndroidReceiver;

/**
 * Provides the application-specific extension of the Application to aggregate the AndroidReceiver.
 * <p>
 * <b>Thread Safety:</b> This class is mutable and not thread safe
 *
 * @author argolite, 7realm
 * @version 1.0
 */
public class ReceiverApplication extends Application {
    /**
     * The instance of the receiver used by this application.
     * <p>
     * It is set in the setter. It can be retrieved in the getter. It may have any value. It will be set when the
     * display activity begins.
     */
    private AndroidReceiver androidReceiver;

    /**
     * Default empty constructor.
     */
    public ReceiverApplication() {
        // empty
    }

    /**
     * Gets the instance of the receiver used by this application.
     *
     * @return the instance of the receiver used by this application
     */
    public AndroidReceiver getAndroidReceiver() {
        return androidReceiver;
    }

    /**
     * Sets the instance of the receiver used by this application.
     *
     * @param androidReceiver the instance of the receiver used by this application
     */
    public void setAndroidReceiver(AndroidReceiver androidReceiver) {
        this.androidReceiver = androidReceiver;
    }

}